home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / MiniGL / include / mgl / matrix.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-07  |  1.2 KB  |  63 lines

  1. /*
  2.  * $Id: matrix.h,v 1.1.1.1 2000/04/07 19:44:51 tfrieden Exp $
  3.  *
  4.  * $Date: 2000/04/07 19:44:51 $
  5.  * $Revision: 1.1.1.1 $
  6.  *
  7.  * (C) 1999 by Hyperion
  8.  * All rights reserved
  9.  *
  10.  * This file is part of the MiniGL library project
  11.  * See the file Licence.txt for more details
  12.  *
  13.  */
  14.  
  15. #ifndef _MATRIX_H
  16. #define _MATRIX_H
  17.  
  18. typedef struct Matrix_t
  19. {
  20.     float v[16];
  21.     int flags;                  // Matrix flags
  22.     struct Matrix_t *Inverse;   // optional inverse
  23. } Matrix;
  24.  
  25. #define OF_11 0
  26. #define OF_12 4
  27. #define OF_13 8
  28. #define OF_14 12
  29.  
  30. #define OF_21 1
  31. #define OF_22 5
  32. #define OF_23 9
  33. #define OF_24 13
  34.  
  35. #define OF_31 2
  36. #define OF_32 6
  37. #define OF_33 10
  38. #define OF_34 14
  39.  
  40. #define OF_41 3
  41. #define OF_42 7
  42. #define OF_43 11
  43. #define OF_44 15
  44.  
  45.  
  46.  
  47.  
  48. #define  MGLMAT_IDENTITY         0x01
  49. #define  MGLMAT_ROTATION         0x02
  50. #define  MGLMAT_TRANSLATION      0x04
  51. #define  MGLMAT_UNIFORM_SCALE    0x08
  52. #define  MGLMAT_GENERAL_SCALE    0x10
  53. #define  MGLMAT_PERSPECTIVE      0x20
  54. #define  MGLMAT_GENERAL          0x40
  55. #define  MGLMAT_GENERAL_3D       0x80
  56. #define  MGLMAT_ORTHO            0x100
  57. #define  MGLMAT_0001             0x200
  58.  
  59. #define MGLMASK_0001 (MGLMAT_IDENTITY|MGLMAT_ROTATION|\
  60.         MGLMAT_TRANSLATION|MGLMAT_UNIFORM_SCALE|MGLMAT_GENERAL_SCALE|MGLMAT_0001)
  61.  
  62. #endif
  63.